feat: add uninit command to reverse init changes#37
Merged
piotrski merged 2 commits intocallstackincubator:mainfrom Apr 3, 2026
Merged
feat: add uninit command to reverse init changes#37piotrski merged 2 commits intocallstackincubator:mainfrom
piotrski merged 2 commits intocallstackincubator:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 5087dda The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
piotrski
previously requested changes
Apr 2, 2026
Add `agent-react-devtools uninit` command that removes all configuration added by `init`. Supports all frameworks (Vite, Next.js App/Pages Router, CRA) and includes --dry-run flag. This makes it easy to cleanly remove devtools integration without manually tracking which files were modified.
…n ownership - removeImport now matches the exact import string instead of any line containing 'agent-react-devtools', preventing accidental removal of unrelated comments or imports - unpatchViteConfig filters the exact import line inserted by init - unpatchNextJs only removes the layout's import './devtools' when devtools.ts was confirmed to be ours, preventing corruption of pre-existing imports with the same name - Add changeset and README entry for uninit command
30f78cc to
5087dda
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
agent-react-devtools uninit [--dry-run]command that cleanly reverses all changes made byinit.Problem
initpatches framework entry files/configs but there's no way to undo those changes programmatically. Users have to manually find and remove the added imports/plugins, or usegit checkout. This is friction for workflows where devtools integration is temporary (e.g. profiling sessions).What this does
uninitcommand to CLIreactDevtools()call from configdevtools.tswrapper, removes import from layout_app--dry-runto preview changesTests
7 new tests covering all frameworks, dry-run, no-op, and init/uninit/init roundtrip. All 75 tests pass.